package com.lyj.mode.factory.abstraction;

/**
 * @desc:
 * @author:liyajie
 * @createTime:2022/2/14 17:46
 * @version:1.0
 */
public class FactoryProducter {

    CakeFactory cakeFactory;

    public FactoryProducter(CakeFactory cakeFactory){
        setCakeFactory(cakeFactory);
    }

    public void setCakeFactory(CakeFactory cakeFactory){
        this.cakeFactory = cakeFactory;
        cakeFactory.createCake();
    }
}
